package com.yupi.yuapiclientsdk.client;

import cn.hutool.http.HttpRequest;

/**
 * @author lkc
 * @version 1.0
 */
public class RandomApiClient extends YuApiClient{
    public RandomApiClient(String accessKey,String secretKey){
        super(accessKey, secretKey);
    }

    //获取随机文本
    public String getRandomWork(){
        return HttpRequest.get(GATEWAY_HOST+"/api/interface/random/word")
                .addHeaders(getHeaderMap(""))
                .execute().body();
    }

    //获取随机图片
    public String getRandomImageUrl(){
        return HttpRequest.post(GATEWAY_HOST+"/api/interface/random/image")
                .addHeaders(getHeaderMap(""))
                .execute().body();
    }
}
